class Student<T> {
    @Override
    public String toString() {
        return "Student{}";
    }
}
public class Test4 {
    public static void main(String[] args) {
        Student<Integer> student1 = new Student<>();
        Student<String> student2 = new Student<>();
        //重写toString方法就会按照你toString里面写的样式进行输出
        System.out.println(student1);
        System.out.println(student2);
    }
}
